#ifndef DAEMON_FACINFOCTL_H
#define DAEMON_FACINFOCTL_H
#include "IPCAM_Export.h"

#ifdef PLATFORM_dm368

#define FACINFONANDDEVPATH		"/dev/mtdblock4"

#elif PLATFORM_hisi3518

#define FACINFONANDDEVPATH		"/dev/mtdblock3"
#elif PLATFORM_hisi3518e

#define FACINFONANDDEVPATH		"/dev/mtdblock3"

#elif PLATFORM_hisi3516a

#define FACINFONANDDEVPATH		"/dev/mtdblock3"

#elif NVR_3520D

#define FACINFONANDDEVPATH		"/mnt/mtd/Config/fac"

#elif PLATFORM_AmbaA5S

#define FACINFONANDDEVPATH		"/dev/mtdblock9"

#elif PLATFORM_AmbaS2L

#define FACINFONANDDEVPATH		"/appex/FACINFO"

#elif PLATFORM_fh8630

#define FACINFONANDDEVPATH		"/mnt/FACINFO"

#elif PLATFORM_jz_t20

#define FACINFONANDDEVPATH		"/mnt/FACINFO"
#else
#define FACINFONANDDEVPATH		"/config/FACINFO"
#endif

#if 0
typedef struct {
    UINT        devNo;                      //内部编号
	UCHAR       devModel[20];               //出厂型号
	UCHAR       devSerialNumb[64];          //出厂编号
    UCHAR       devRegcode[26];             //设备注册码
    CHAR        devName[24];                //设备显示名称
	CHAR		szFactoryName[32];			//厂家名称
	UCHAR		NetMacAddr[24];				//MAC addr
	UCHAR 		LogoType;					//logo 类型
	ULONG 		FactoryTime;				//出厂时间 
	//CHAR		sensor[32];                 //感应器 
	INT			WifiOFF;					//是否支持wifi
	INT			SDOFF;						//是否支持sd
	INT			AudioInOFF;					//是否支持audio input
	INT			AudioOutOFF;				//是否支持audio output 
	INT			IOOFF;						//是否支持IO 
	INT			ThreeMachineSupport;		//是否支持三倍机
	CHAR 		PTPUUID[32];           	    //设备号   
	CHAR		sensor[32];                 //感应器 
    INT         nChannel;                   //通道 nvr用
	CHAR		buf[88];                    //预留的剩余空间(总大小544字节 - 已用的字节) sizeof(NetPacket.MsgBuf) - sizeof(NetPacket.MsgDevSearch) 
}SAVENANDINFO_T;
#else
typedef struct {
    UINT        devNo;                      //内部编号
	CHAR       devModel[20];               //出厂型号
	CHAR       devSerialNumb[64];          //出厂编号
    CHAR       devRegcode[26];             //设备注册码
    CHAR        devName[24];                //设备显示名称
	CHAR		szFactoryName[32];			//厂家名称
	CHAR		NetMacAddr[24];				//MAC addr
	
	UCHAR 		LogoType;					//logo 类型
	ULONG 		FactoryTime;				//出厂时间
	INT			WifiOFF;
	INT			SDOFF;
	INT			AudioInOFF;
	INT			AudioOutOFF;
	INT			IOOFF;						//是否支持IO
  	INT			ThreeMachineSupport;		//是否支持三倍机
	CHAR 		PTPUUID[32];           	    //设备号
	CHAR		sensor[32];                 //
	INT			nChannel;					//通道 NVR用
	CHAR 		PTPCMEI[32];           	    //device CMEI
	CHAR        PTPDevKey[76];                //yd 密钥 有效72
}SAVENANDINFO_T;
#endif

INT CheckUuid(SAVENANDINFO_T *pInFacInfo);
INT IPCAM_WriteFacInfo(SAVENANDINFO_T *pFacInfo);
INT IPCAM_ReadFacInfo(SAVENANDINFO_T *pFacInfo);


#define DEV_SHOWNAME				"IPC"
#define DEV_FACNAME					"深圳万佳安物联科技有限公司"
#define DEV_REGCODE					"RL0808"
#define DEV_SERIALNUM				"RL01-RL0808-001A2B3C4D5E123456"
#define DEV_NO						123456
#define DEV_MODEL					"RL01"
#define DEFAULT_NET_MACADDR			"00:1A:2B:3C:4D:5E"
#define DEFAULT_UID 	            "0000000000000000" 
#define DEFAULT_CMEI                "000000000000000" 
#define DEFAULT_DEVKEY              "000000000000000000000000000000000000000000000000000000000000000000000000"
#define DEFAULT_SENSOR              "OV9712"
#define DEFAULT_HVERSION            "HC18"
#define SUPPORT_WIFI                0
#define SUPPORT_SD                  0
#define SUPPORT_AUDIOOUTPUT         0 
#define SUPPORT_AUDIOINPUT          0
#define SUPPORT_THREEMACHINE        1
#define SUPPORT_IO                  0



#endif //DAEMON_FACINFOCTL_H


